package org.micro.frame.um.controller;

import org.micro.frame.um.api.MemberFeignApi;
import org.micro.frame.um.entity.Member;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * The Member API Controller.
 *
 * @author lry
 */
@RestController
public class MemberController {

    @Autowired
    private MemberFeignApi memberFeignApi;

    @RequestMapping(value = "/member/{id}", method = RequestMethod.GET)
    public Member findMemberById(@PathVariable("id") Long id) {
        return memberFeignApi.findMemberById(id);
    }

}
